#check-flanneld.sh
source /opt/k8s/bin/environment.sh
for i in "${!NODE_IPS[@]}"
do
	node_ip=${NODE_IPS[$i]}
	node_port=${NODE_PORTS[$i]} 
	echo ">>> ${node_ip}:${node_port} "
	ssh -p ${node_port}  k8s@${node_ip} "systemctl status flanneld|grep Active"
	etcdctl \
	--endpoints=${ETCD_ENDPOINTS} \
	--ca-file=/etc/kubernetes/cert/ca.pem \
	--cert-file=/etc/flanneld/cert/flanneld.pem \
	--key-file=/etc/flanneld/cert/flanneld-key.pem \
	get ${FLANNEL_ETCD_PREFIX}/config
	etcdctl \
	--endpoints=${ETCD_ENDPOINTS} \
	--ca-file=/etc/kubernetes/cert/ca.pem \
	--cert-file=/etc/flanneld/cert/flanneld.pem \
	--key-file=/etc/flanneld/cert/flanneld-key.pem \
	ls ${FLANNEL_ETCD_PREFIX}/subnets
done